﻿<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>查看用户详细信息</title>
    <link href="/Themes/Styles/style.css" rel="stylesheet" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.source.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.source.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/TreeTable/jquery.treeTable.js" type="text/javascript"></script>
    <link href="/Themes/Scripts/TreeTable/css/jquery.treeTable.css" rel="stylesheet"
        type="text/css" />
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script>
        $(function () {
            InitControl();
            divresize('.ScrollBar', 78);
            getAjax("/User/GetRoleList", { key: GetQuery('key') }, function (data) {
                $("#RoleListhtml").html(data);
            })
            $("#RoleList").treeTable({
                initialState: "expanded" //collapsed 收缩 expanded展开的
            });
            getAjax("/User/GetPermissionTree", { key: GetQuery('key') }, function (data) {
                $("#PermissionListhtml").html(data);
            })
            $("#PermissionTree").treeTable({
                initialState: "expanded" //collapsed 收缩 expanded展开的
            });
            dndexampleCss();
            $(".tabPanel").hide();
            $("#tb_basic").show();
        })
        //得到一个对象实体
        function InitControl() {
            getAjax("/User/InitControlUserInfo", { key: GetQuery('key') }, function (data) {
                var data = eval("(" + data + ")");
                for (var key in data) {
                    var id = $('#' + key);
                    var value = $.trim(data[key]);
                    id.text(value);
                }
                $("#Password").text("******");
                $("#Enabled").text = data.Enabled == "1" ? "是" : "否";
                if (data.Gender == "男") {
                    $("#imgGender").attr('src', "/Themes/Images/man.png");
                }
                else {
                    $("#imgGender").attr('src', "/Themes/Images/woman.png");
                }
                $("#strUserInfo").html(data.RealName + "（" + data.Account + "）");
                if (data.Birthday.length > 0) {
                    $("#Birthday").text(new Date(data.Birthday).pattern("yyyy-MM-dd"));
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1">
        <div class="WarmPrompt-Info">
            <img id="imgGender" style="width: 38px; height: 38px; vertical-align: middle; margin-bottom: 5px;" />
            <span id="strUserInfo"></span>
        </div>
        <div class="bd">
            <div class="tipstitle_title settingtable bold bd todayInfoPanelTab rightPanelTitle_normal">
                <div class="tab_list_top" style="position: absolute">
                    <div class="tab_list bd actived" onclick="Tabchange('tb_basic')">基本信息</div>
                    <div class="tab_list bd " onclick="Tabchange('RoleList')">拥有角色</div>
                    <div class="tab_list bd " onclick="Tabchange('PermissionTree')">拥有权限</div>
                </div>
            </div>
            <div class="ScrollBar">
                <table id="tb_basic" border="0" cellpadding="0" cellspacing="0" class="frm tabPanel" style="margin-top: 1px; border-top: 1px solid #ccc;">
                    <tr>
                        <th class="highlight">编号：
                        </th>
                        <td>
                            <label id="Code"></label>
                        </td>
                        <th class="highlight">登录账户：
                        </th>
                        <td>
                            <label id="Account"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">姓名：
                        </th>
                        <td>
                            <label id="RealName"></label>
                        </td>
                        <th class="highlight">登录密码：
                        </th>
                        <td>
                            <label id="Password"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">性别：
                        </th>
                        <td>
                            <label id="Gender"></label>
                        </td>
                        <th class="highlight">手机号码：
                        </th>
                        <td>
                            <label id="Mobile"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">出生日期：
                        </th>
                        <td>
                            <label id="Birthday"></label>
                        </td>
                        <th class="highlight">固定电话：
                        </th>
                        <td>
                            <label id="Telephone"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">职位：
                        </th>
                        <td>
                            <label id="DutyId"></label>
                        </td>
                        <th class="highlight">QQ号码：
                        </th>
                        <td>
                            <label id="OICQ"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">职称：
                        </th>
                        <td>
                            <label id="TitleId"></label>
                        </td>

                        <th class="highlight">电子邮件：
                        </th>
                        <td>
                            <label id="Email"></label>
                        </td>
                    </tr>
                    <tr>

                        <th class="highlight">公司：
                        </th>
                        <td>
                            <label id="CompanyId"></label>
                        </td>
                        <th class="highlight">默认角色：
                        </th>
                        <td>
                            <label id="RoleId"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">部门名称：
                        </th>
                        <td>
                            <label id="DepartmentId"></label>
                        </td>
                        <th class="highlight">工作组名称：
                        </th>
                        <td>
                            <label id="WorkgroupId"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">有效性：
                        </th>
                        <td colspan="3">
                            <label id="Enabled"></label>
                        </td>
                    </tr>
                    <tr>
                        <th class="highlight">说明：
                        </th>
                        <td colspan="3">
                            <label id="Description"></label>
                        </td>
                    </tr>
                </table>

                <table class="example tabPanel" id="RoleList">
                    <thead>
                        <tr>
                            <td style="width: 200px;">角色名称
                            </td>
                            <td style="width: 100px; text-align: center;">编号
                            </td>
                            <td style="width: 100px; text-align: center;">角色分类
                            </td>
                            <td>说明
                            </td>
                        </tr>
                    </thead>
                    <tbody id="RoleListhtml">
                    </tbody>
                </table>

                <table class="example tabPanel" id="PermissionTree">
                    <thead>
                        <tr>
                            <td style="width: 230px; padding-left: 20px;">模块(菜单)名称
                            </td>
                            <td>说明
                            </td>
                        </tr>
                    </thead>
                    <tbody id="PermissionListhtml">
                    </tbody>
                </table>
            </div>
        </div>
    </form>
</body>
</html>
